<form name="order_status_reset" action="index.php" enctype="multipart/form-data" method="post">
<input name="admin" type="hidden" value="1">
<input name="module" type="hidden" value="shop_cart">
<input name="act" type="hidden" value="reset_stat">
<input name="parent" type="hidden" value="{$smarty.get.order_id}">
<input name="referer" type="hidden" value="{ext->get_referer}">
</form>
					
{ext->class_function class="shop_cart" func="get_stats" assign="stats2"}
{if $smarty.get.stats_order=='sum'}
	{ext->aasort array=$stats2 args="-suma" assign='stats'}
{elseif $smarty.get.stats_order=='count'}
	{ext->aasort array=$stats2 args="-count" assign='stats'}
{else}
	{ext->aasort array=$stats2 args="-suma" assign='stats'}
{/if}
<!-- * list -->
{capture name="list"}
	{counter start=1 skip=1 assign="ct"}
	{foreach from=$stats item="el"}			
	{if 150>$ct}
			<!-- * -->
			<table width="100%" cellpadding="0" cellspacing="0">
				<tr>
					<td height="1" bgcolor="#FFFFFF"><img src="client/img/spacer.gif" class="spacer" alt="" /></td>
				</tr>
			</table>
			<table width="100%" cellpadding="0" cellspacing="0" {if !$el.hide}bgcolor="#FDFDFD"{else}bgcolor="#F4F6F7"{/if} >
				<tr>			
					<td width="250"  style="border-right:1px solid #D6DBDE; padding:3px 10px 3px 10px" height="22">{$el.name}</td>	
					<td width="150" align="center" style="border-right:1px solid #D6DBDE">{$el.suma}</td>
					<td  style="border-right:1px solid #D6DBDE; padding:0px 10px 0px 10px" width="130" align="center">{$el.count}</td>				
					<td><img src="client/img/spacer.gif" width="1" height="1" border="0" alt="" /></td>	
				</tr>
			</table>
			<table width="100%" cellpadding="0" cellspacing="0">
				<tr>
					<td height="1" bgcolor="#D6DBDE"><img src="client/img/spacer.gif" class="spacer" alt="" /></td>
				</tr>
			</table>
			<!-- /* -->			
	{/if}
	{counter skip=1 assign="ct"}
	{/foreach}	
<!-- /* list -->
{/capture}

{include file="admin/modules/shop_cart/tabs.html"}

<table width="100%" cellpadding="0" cellspacing="0" border="6" bordercolor="#DBE1E5" bgcolor="#DBE1E5">
<tr>
<td>
{include file="admin/modules/shop_cart/menu_stats.html"}
<table width="100%" cellpadding="0" cellspacing="0">
	<tr>
		<td height="12"><img src="client/img/spacer.gif" class="spacer" alt="" /></td>		
	</tr>
	<tr>
		<td height="1" bgcolor="#25404E"><img src="client/img/spacer.gif" class="spacer" alt="" /></td>
	</tr>
</table>

{if $ct>1}
<table width="100%" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF">
	<tr>		
		<td height="20" style="font-size:9px; color:#4C4C4C; border-right:1px solid #D6DBDE; padding:0px 10px 0px 10px" width="250">{t t='Pavadinimas'}</td>	
		<td height="20" style="font-size:9px; color:#4C4C4C; text-align:center; border-right:1px solid #D6DBDE" width="150">{t t='Suma'}</td>		
		<td height="20" style="font-size:9px; color:#4C4C4C; text-align:center; border-right:1px solid #D6DBDE" width="150">{t t='Pardavimų skaičius'}</td>								
		<td style="font-size:9px; color:#4C4C4C; text-align:left; padding:0px 0px 0px 10px"><img src="client/img/spacer.gif" class="spacer" alt="" /></td>		
	</tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
	<tr>
		<td height="1" bgcolor="#D6DBDE"><img src="client/img/spacer.gif" class="spacer" alt="" /></td>
	</tr>
</table>
{$smarty.capture.list}
{else}
<table width="100%" cellpadding="0" cellspacing="0">
	<tr>
		<td height="50" bgcolor="#FFFFFF" align="center" style="padding:15px">
		{t t='Nėra nei vieno užsakymo'}
		{if $smarty.get.form_object_id}.
		  <a href="index.php?admin=1" target="_self"><strong>{t t='Atkreipkite dėmesį, kad įjungtas filtravimas. Norėdami jį išjungti spauskite čia!'}</strong></a>
		{/if} 
		</td>		
	</tr>
</table>
{/if}

<table width="100%" cellpadding="0" cellspacing="0">
	<tr>
		<td height="1" bgcolor="#25404E"><img src="client/img/spacer.gif" class="spacer" alt="" /></td>
	</tr>
	<tr>
		<td height="12"><img src="client/img/spacer.gif" class="spacer" alt="" /></td>		
	</tr>	
</table>
{include file="admin/modules/shop_cart/menu_stats.html"}
</td>		
</tr>
</table>


{*debug var=$stats*}